package pearson.automation.forms.upload;

import org.openqa.selenium.By;

import framework.BaseForm;
import framework.elements.Button;
import framework.elements.CheckBox;

public class UploadForm extends BaseForm {
    
    private static CheckBox privacy = new CheckBox(By.id("privacy"), "Privacy");
    private static CheckBox terms = new CheckBox(By.id("terms"), "Terms & Conditions");
    
    private Button ok = new Button(By.name("_submit"), "OK");
    private Button close = new Button(By.linkText("Close"), "Close");
    
    public UploadForm() {
    super(privacy.getLocator(), "Upload");
    }
    public void clickClose() {
    close.clickAndWait();
    }
    
    public void checkPrivacyPolicy() {
    privacy.check(false);
    }

    public void checkTermsAndConditions() {
    terms.check(false);
    }
    
    public UploadBranchForm clickOK() {
    ok.clickAndWait();
    return new UploadBranchForm();
    }
}
